package server.util.tickevents;

import player.PlayerManager;

/**
 *
 * @author Michael Hanns
 *
 */
public class SavePlayers implements TickerEvent {
    
    private PlayerManager players;
    
    public SavePlayers(PlayerManager p) {
        this.players = p;
    }

    @Override
    public void executeEvent() {
        save();
    }
    
    private void save() {
        if (players != null) {
            players.savePlayers();
            System.out.println("players saved");
        } else {
            System.out.println("p == null");
        }
    }
}
